package com.ruoyi.system.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;

public class RideRecord {
    private String passengerName; // 乘客姓名
    private String passengerPhoneNumber; // 乘客电话号码
    private String vehicleLicensePlate; // 车辆车牌号
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date rideTime; // 乘车时间
    private BigDecimal fare; // 车费金额

    // 构造函数
    public RideRecord(String passengerName, String passengerPhoneNumber,
                      String vehicleLicensePlate, Date rideTime, BigDecimal fare) {
        this.passengerName = passengerName;
        this.passengerPhoneNumber = passengerPhoneNumber;
        this.vehicleLicensePlate = vehicleLicensePlate;
        this.rideTime = rideTime;
        this.fare = fare;
    }

    // Getter 和 Setter 方法
    public String getPassengerName() {
        return passengerName;
    }

    public void setPassengerName(String passengerName) {
        this.passengerName = passengerName;
    }

    public String getPassengerPhoneNumber() {
        return passengerPhoneNumber;
    }

    public void setPassengerPhoneNumber(String passengerPhoneNumber) {
        this.passengerPhoneNumber = passengerPhoneNumber;
    }

    public String getVehicleLicensePlate() {
        return vehicleLicensePlate;
    }

    public void setVehicleLicensePlate(String vehicleLicensePlate) {
        this.vehicleLicensePlate = vehicleLicensePlate;
    }

    public Date getRideTime() {
        return rideTime;
    }

    public void setRideTime(Date rideTime) {
        this.rideTime = rideTime;
    }

    public BigDecimal getFare() {
        return fare;
    }

    public void setFare(BigDecimal fare) {
        this.fare = fare;
    }

    // toString 方法，用于打印乘车记录信息
    @Override
    public String toString() {
        return "RideRecord{" +
                "passengerName='" + passengerName + '\'' +
                ", passengerPhoneNumber='" + passengerPhoneNumber + '\'' +
                ", vehicleLicensePlate='" + vehicleLicensePlate + '\'' +
                ", rideTime=" + rideTime +
                ", fare=" + fare +
                '}';
    }
}